package com.pattern.GuavaAPI;

import com.google.common.eventbus.Subscribe;

import java.util.Observable;

public class Teacher {

    private String name;

    public Teacher(String name) {
        this.name = name;
    }

    @Subscribe
    public void update(Question question){

        System.out.println("=========================");
        System.out.println(name+"老师，你好！\n"+"你收到一提问，希望你解答，问题如下：\n"+question.getContent()+"\n"+
                "提问者：" + question.getUserName());

    }
}
